package com.zr.java8.pattern.state.impl;

import com.zr.java8.pattern.state.OrderContext;
import com.zr.java8.pattern.state.OrderState;

// 已完成状态
public class CompletedState implements OrderState {
    @Override
    public void pay(OrderContext context) {
        System.out.println("错误：订单已完成，无需支付！");
    }

    @Override
    public void ship(OrderContext context) {
        System.out.println("错误：订单已完成，无需发货！");
    }

    @Override
    public void complete(OrderContext context) {
        System.out.println("错误：订单已完成，无需重复操作！");
    }

    @Override
    public String getStateName() {
        return "已完成";
    }
}